//创建调查问卷模板页面

import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import './Questionnaire.css';
import {Input, Radio, Button, message} from 'antd';
import {URL} from '../constant/Constant'
import $ from 'jquery';
import { stringify } from 'querystring';
import axios from "axios";

// RadioGroup和options1-4是单选框
// 单选框部分开始
const RadioGroup = Radio.Group;
const options1 = [
    {label: '是', value: '1'},
    {label: '否', value: '0'},
];
const options2 = [
    {label: '是', value: '1'},
    {label: '否', value: '0'},
];
const options3 = [
    {label: '是', value: '1'},
    {label: '否', value: '0'},
];
const options4 = [
    {label: '是', value: '1'},
    {label: '否', value: '0'},
];

// const url = 'http://192.168.1.137:8088';
const url = 'http://duodao.chende.top';

// 单选框部分结束
export default class Quset extends Component {
    constructor(props) {
        super(props);
        this.state = {
            // value1-4是四个单选框
            value1: '0',
            value2: '0',
            value3: '0',
            value4: '0',
            // ajax传值
            data: [],
            yuanliao1: [
                '',
                '',
                '',
                '',
                '',
                '',
                '',
            ],
            xiaohao1: [],
            yuanliao2: [
                '',
                '',
                '',
            ],
            xiaohao2: [],
            shuzhi: [],
            paifang: [],
            chucheng: [],
            qingkuang: [],

        };
    }


    // onChange1-4是单选框的四个函数
    // 单选函数开始
    onChange1 = (e) => {
        console.log('radio1 checked', e.target.value);
        this.setState({
            value1: e.target.value,
        });
    };
    onChange2 = (e) => {
        console.log('radio2 checked', e.target.value);
        this.setState({
            value2: e.target.value,
        });
    };
    onChange3 = (e) => {
        console.log('radio3 checked',e.target.value);
        this.setState({
            value3: e.target.value,
        });
    };
    onChange4 = (e) => {
        console.log('radio4 checked', e.target.value);
        this.setState({
            value4: e.target.value,
        });
    };

    // 单选函数结束
    //ajax传值开始
    handlechange1 = (event, i) => {
        let newdata = this.state.data;
        newdata[i] = event.target.value;
        this.setState(({
            data: newdata,
        }));
        // console.log(newdata);
    };

    handlechange2 = (event, i) => {
        let newdata = this.state.yuanliao1;
        newdata[i] = event.target.value;
        this.setState({
            yuanliao1: newdata,
        });
        console.log(newdata);
    };

    handlechange3 = (event, i) => {
        let newdata = this.state.xiaohao1;
        newdata[i] = event.target.value;
        this.setState({
            xiaohao1: newdata,
        });
        console.log(newdata);
    };

    handlechange4 = (event, i) => {
        let newdata = this.state.yuanliao2;
        newdata[i] = event.target.value;
        this.setState({
            yuanliao2: newdata,
        });
        console.log(newdata);
    };

    handlechange5 = (event, i) => {
        let newdata = this.state.xiaohao2;
        newdata[i] = event.target.value;
        this.setState({
            xiaohao2: newdata,
        });
        console.log(newdata);
    };

    //数值
    handlechange6 = (event, i) => {
        let newdata = this.state.shuzhi;
        newdata[i] = event.target.value;
        this.setState({
            shuzhi: newdata,
        });
        console.log(newdata);
    };

    //排放
    handlechange7 = (event, i) => {
        let newdata = this.state.paifang;
        newdata[i] = event.target.value;
        this.setState({
            paifang: newdata,
        });
        console.log(newdata);
    };

    //除尘
    handlechange8 = (event, i) => {
        let newdata = this.state.chucheng;
        newdata[i] = event.target.value;
        this.setState({
            chucheng: newdata,
        });
        console.log(newdata);
    };

    //情况
    handlechange9 = (event, i) => {
        let newdata = this.state.qingkuang;
        newdata[i] = event.target.value;
        this.setState({
            qingkuang: newdata,
        });
        console.log(newdata);
    };

    /**ajax传值开始**/
    handleSubmit = (event) => {
        event.preventDefault();
        const formData = new FormData();
        formData.append('compname', this.state.data[0]);
        formData.append('author', this.state.data[5]);
        formData.append('line_name', this.state.data[1]);
        formData.append('line_size', this.state.data[2])
        formData.append('year_run_days', this.state.data[3])
        formData.append('comp_address', this.state.data[4])
        formData.append('phone_num', this.state.data[6])
        formData.append('zyxh_slsc_yl1_name', this.state.yuanliao1[0])
        formData.append('zyxh_slsc_yl1_xiaohao', this.state.xiaohao1[0])
        formData.append('zyxh_slsc_yl2_name', this.state.yuanliao1[1])
        formData.append('zyxh_slsc_yl2_xiaohao', this.state.xiaohao1[1])
        formData.append('zyxh_slsc_yl3_name', this.state.yuanliao1[2])
        formData.append('zyxh_slsc_yl3_xiaohao', this.state.xiaohao1[2])
        formData.append('zyxh_slsc_yl4_name', this.state.yuanliao1[3])
        formData.append('zyxh_slsc_yl4_xiaohao', this.state.xiaohao1[3])
        formData.append('zyxh_slsc_yl5_name', this.state.yuanliao1[4])
        formData.append('zyxh_slsc_yl5_xiaohao', this.state.xiaohao1[4])
        formData.append('zyxh_slsc_yl6_name', this.state.yuanliao1[5])
        formData.append('zyxh_slsc_yl6_xiaohao', this.state.xiaohao1[5])
        formData.append('zyxh_rl_rl1_name', this.state.yuanliao1[6])
        formData.append('zyxh_rl_rl1_xiaohao', this.state.yuanliao1[6])
        formData.append('zyxh_rl_rl2_name', this.state.yuanliao1[7])
        formData.append('zyxh_rl_rl2_xiaohao', this.state.xiaohao1[7])
        formData.append('zyxh_rl_rl3_name', this.state.yuanliao1[8])
        formData.append('zyxh_rl_rl3_xiaohao', this.state.xiaohao1[8])
        formData.append('zyxh_shuliaocl', this.state.xiaohao1[9])
        formData.append('zyxh_slzcylc_yl1_name', this.state.yuanliao2[0])
        formData.append('zyxh_slzcylc_yl1_xiaohao', this.state.xiaohao2[0])
        formData.append('zyxh_slzcylc_yl2_name', this.state.yuanliao2[1])
        formData.append('zyxh_slzcylc_yl2_xiaohao', this.state.xiaohao2[1])
        formData.append('zyxh_slzcylc_yl3_name', this.state.yuanliao2[2])
        formData.append('zyxh_slzcylc_yl3_xiaohao', this.state.xiaohao2[2])
        formData.append('zyxh_slzcylc_yl4_name', this.state.yuanliao2[3])
        formData.append('zyxh_slzcylc_yl4_xiaohao', this.state.xiaohao2[3])
        formData.append('zyxh_slzcylc_yl5_name', this.state.yuanliao2[4])
        formData.append('zyxh_slzcylc_yl5_xiaohao', this.state.xiaohao2[4])
        formData.append('zyxh_slzcylc_yl6_name', this.state.yuanliao2[5])
        formData.append('zyxh_slzcylc_yl6_xiaohao', this.state.xiaohao2[5])
        formData.append('zyxh_slzcylc_yl7_name', this.state.yuanliao2[6])
        formData.append('zyxh_slzcylc_yl7_xiaohao', this.state.xiaohao2[6])
        formData.append('zyxh_slzcylc_yl8_name', this.state.yuanliao2[7])
        formData.append('zyxh_slzcylc_yl8_xiaohao', this.state.xiaohao2[7])
        formData.append('zyxh_slzcylc_yl9_name', this.state.yuanliao2[8])
        formData.append('zyxh_slzcylc_yl9_xiaohao', this.state.xiaohao2[8])
        formData.append('zyxh_shuinicl', this.state.xiaohao2[9])
        formData.append('designchanneng', this.state.shuzhi[0])
        formData.append('rehao', this.state.shuzhi[1])
        formData.append('nyxh_shuliao_dianhao', this.state.shuzhi[2])
        formData.append('nyxh_shuliao_nenghao', this.state.shuzhi[3])
        formData.append('nyxh_shuini_dianhao', this.state.shuzhi[4])
        formData.append('nyxh_shuini_nenghao', this.state.shuzhi[5])
        formData.append('nyxh_shuliao_fadian', this.state.shuzhi[6])
        formData.append('fqpf_keliwu_yt_paifang', this.state.paifang[0])
        formData.append('fqpf_keliwu_yt_pfnongdu', this.state.paifang[8])
        formData.append('fqpf_keliwu_yt_chuchen', this.state.chucheng[0])
        formData.append('fqpf_keliwu_yw_paifang', this.state.paifang[1])
        formData.append('fqpf_keliwu_yw_pfnongdu', this.state.paifang[9])
        formData.append('fqpf_keliwu_yw_chuchen', this.state.chucheng[1])
        formData.append('fqpf_keliwu_snm_paifang', this.state.paifang[2])
        formData.append('fqpf_keliwu_snm_nongdu', this.state.paifang[10])
        formData.append('fqpf_keliwu_snm_chuchen', this.state.chucheng[2])
        formData.append('fqpf_keliwu_mm_paifang', this.state.paifang[3])
        formData.append('fqpf_keliwu_mm_nongdu', this.state.paifang[11])
        formData.append('fqpf_keliwu_mm_chuchen', this.state.chucheng[3])
        formData.append('fqpf_keliwu_bzj_paifang', this.state.paifang[4])
        formData.append('fqpf_keliwu_bzj_nongdu', this.state.paifang[12])
        formData.append('fqpf_keliwu_bzj_chuchen', this.state.chucheng[4])
        formData.append('fqpf_SO2_yw_paifang', this.state.paifang[5])
        formData.append('fqpf_SO2_yw_nongdu', this.state.paifang[13])
        formData.append('fqpf_SO2_yw_chuchen', this.state.chucheng[5])
        formData.append('fqpf_NOX_yw_paifang', this.state.paifang[6])
        formData.append('fqpf_NOX_yw_nongdu', this.state.paifang[14])
        formData.append('fqpf_NOX_yw_chuchen', this.state.chucheng[6])
        formData.append('fqpf_pa_shuliao_paifang', this.state.paifang[7])
        formData.append('fqpf_pa_shuliao_chuchen', this.state.chucheng[7])
        formData.append('fqpf_txgy_SNCR', this.state.value1)
        formData.append('fqpf_txgy_fjrs', this.state.value2)
        formData.append('fqpf_oneplustwo', this.state.value3)
        formData.append('fqpf_txgy_qita', this.state.value4)
        formData.append('zysb_shengliao_fenmo_qingkuang', this.state.qingkuang[0])
        formData.append('zysb_shengliao_xinghao', this.state.qingkuang[1])
        formData.append('zysb_shengliao_shuliang', this.state.qingkuang[2])
        formData.append('zysb_yao_guige', this.state.qingkuang[3])
        formData.append('zysb_shuinimo_fenmo', this.state.qingkuang[4])
        formData.append('zysb_shuinimo_guige', this.state[5])
        formData.append('zysb_shuinimo_shuliang', this.state.qingkuang[6])

        var jsonData = {
            "compname": this.state.data[0],
            "author": this.state.data[5],
            "line_name": this.state.data[1],
            "line_size": this.state.data[2],
            "year_run_days": this.state.data[3],
            "compaddress": this.state.data[4],
            "phone_num": this.state.data[6],
            "zyxh_slsc_yl1_name": this.state.yuanliao1[0],
            "zyxh_slsc_yl1_xiaohao": this.state.xiaohao1[0],
            "zyxh_slsc_yl2_name": this.state.yuanliao1[1],
            "zyxh_slsc_yl2_xiaohao": this.state.xiaohao1[1],
            "zyxh_slsc_yl3_name": this.state.yuanliao1[2],
            "zyxh_slsc_yl3_xiaohao": this.state.xiaohao1[2],
            "zyxh_slsc_yl4_name": this.state.yuanliao1[3],
            "zyxh_slsc_yl4_xiaohao": this.state.xiaohao1[3],
            "zyxh_slsc_yl5_name": this.state.yuanliao1[4],
            "zyxh_slsc_yl5_xiaohao": this.state.xiaohao1[4],
            "zyxh_slsc_yl6_name": this.state.yuanliao1[5],
            "zyxh_slsc_yl6_xiaohao": this.state.xiaohao1[5],
            "zyxh_rl_rl1_name": this.state.yuanliao1[6],
            "zyxh_rl_rl1_xiaohao": this.state.xiaohao1[6],
            "zyxh_rl_rl2_name": this.state.yuanliao1[7],
            "zyxh_rl_rl2_xiaohao": this.state.xiaohao1[7],
            "zyxh_rl_rl3_name": this.state.yuanliao1[8],
            "zyxh_rl_rl3_xiaohao": this.state.xiaohao1[8],
            "zyxh_shuliaocl": this.state.xiaohao1[9],
            "zyxh_slzcylc_yl1_name": this.state.yuanliao2[0],
            "zyxh_slzcylc_yl1_xiaohao": this.state.xiaohao2[0],
            "zyxh_slzcylc_yl2_name": this.state.yuanliao2[1],
            "zyxh_slzcylc_yl2_xiaohao": this.state.xiaohao2[1],
            "zyxh_slzcylc_yl3_name": this.state.yuanliao2[2],
            "zyxh_slzcylc_yl3_xiaohao": this.state.xiaohao2[2],
            "zyxh_slzcylc_yl4_name": this.state.yuanliao2[3],
            "zyxh_slzcylc_yl4_xiaohao": this.state.xiaohao2[3],
            "zyxh_slzcylc_yl5_name": this.state.yuanliao2[4],
            "zyxh_slzcylc_yl5_xiaohao": this.state.xiaohao2[4],
            "zyxh_slzcylc_yl6_name": this.state.yuanliao2[5],
            "zyxh_slzcylc_yl6_xiaohao": this.state.xiaohao2[5],
            "zyxh_slzcylc_yl7_name": this.state.yuanliao2[6],
            "zyxh_slzcylc_yl7_xiaohao": this.state.xiaohao2[6],
            "zyxh_slzcylc_yl8_name": this.state.yuanliao2[7],
            "zyxh_slzcylc_yl8_xiaohao": this.state.xiaohao2[7],
            "zyxh_slzcylc_yl9_name": this.state.yuanliao2[8],
            "zyxh_slzcylc_yl9_xiaohao": this.state.xiaohao2[8],
            "zyxh_shuinicl": this.state.xiaohao2[9],
            "nyxh_shengliao_dianhao": this.state.shuzhi[0],
            "designchanneng": this.state.shuzhi[0],
            "nyxh_shuliao_meihao": this.state.shuzhi[1],
            "rehao": this.state.shuzhi[1],
            "nyxh_shuliao_dianhao": this.state.shuzhi[2],
            "nyxh_shuliao_nenghao": this.state.shuzhi[3],
            "nyxh_shuini_dianhao": this.state.shuzhi[4],
            "nyxh_shuini_nenghao": this.state.shuzhi[5],
            "nyxh_shuliao_fadian": this.state.shuzhi[6],
            "fqpf_keliwu_yt_paifang": this.state.paifang[0],
            "fqpf_keliwu_yt_pfnongdu": this.state.paifang[8],
            "fqpf_keliwu_yt_chuchen": this.state.chucheng[0],
            "fqpf_keliwu_yw_paifang": this.state.paifang[1],
            "fqpf_keliwu_yw_pfnongdu": this.state.paifang[9],
            "fqpf_keliwu_yw_chuchen": this.state.chucheng[1],
            "fqpf_keliwu_snm_paifang": this.state.paifang[2],
            "fqpf_keliwu_snm_nongdu": this.state.paifang[10],
            "fqpf_keliwu_snm_chuchen": this.state.chucheng[2],
            "fqpf_keliwu_mm_paifang": this.state.paifang[3],
            "fqpf_keliwu_mm_nongdu": this.state.paifang[11],
            "fqpf_keliwu_mm_chuchen": this.state.chucheng[3],
            "fqpf_keliwu_bzj_paifang": this.state.paifang[4],
            "fqpf_keliwu_bzj_nongdu": this.state.paifang[12],
            "fqpf_keliwu_bzj_chuchen": this.state.chucheng[4],
            "fqpf_SO2_yw_paifang": this.state.paifang[5],
            "fqpf_SO2_yw_nongdu": this.state.paifang[13],
            "fqpf_SO2_yw_chuchen": this.state.chucheng[5],
            "fqpf_NOX_yw_paifang": this.state.paifang[6],
            "fqpf_NOX_yw_nongdu": this.state.paifang[14],
            "fqpf_NOX_yw_chuchen": this.state.chucheng[6],
            "fqpf_pa_shuliao_paifang": this.state.paifang[7],
            // 熟料是没有排放浓度的
            // "fqpf_pa_shuliao_nongdu" :double DEFAULT NULL COMMENT '排放浓度',
            "fqpf_pa_shuliao_chuchen": this.state.chucheng[7],
            // 下面四个数值是value，是0/1；
            "fqpf_txgy_SNCR": this.state.value1,
            "fqpf_txgy_fjrs": this.state.value2,
            "fqpf_oneplustwo": this.state.value3,
            "fqpf_txgy_qita": this.state.value4,
            "zysb_shengliao_fenmo_qingkuang": this.state.qingkuang[0],
            "zysb_shengliao_xinghao": this.state.qingkuang[1],
            "zysb_shengliao_shuliang": this.state.qingkuang[2],
            "zysb_yao_guige": this.state.qingkuang[3],
            "zysb_shuinimo_fenmo": this.state.qingkuang[4],
            "zysb_shuinimo_guige": this.state.qingkuang[5],
            "zysb_shuinimo_shuliang": this.state.qingkuang[6]
        };
        console.log(jsonData);
        axios({
            method: 'post',
            url: URL.urlRoot+"/questionnaires/diaoyan/add",
            data: jsonData,
            headers: {
                "Content-Type": "application/json",
                'Authorization': window.localStorage.authorization,
            }
        }).then(res=>{
            console.log("res.data")
            console.log(res)
            console.log("res.data")
            if(res.data.code == 0){
                message.info('数据提交成功！');
                window.location.href='/';
            }else{
                message.info('数据提交失败！');
                window.location.href='/';
            }
        } )
            .catch(error => console.error('Error:', error))

    };

    handleBack = () => {
        window.location.href = '/';
    }

    /**ajax传值结束**/
    render() {
        //定义input的value数组
        const {
            data,
            yuanliao1,
            xiaohao1,
            yuanliao2,
            xiaohao2,
            shuzhi,
            paifang,
            chucheng,
            qingkuang,
        } = this.state;
        return (
            <form id="form-add" onSubmit={this.handleSubmit}>
                <div className="first">
                    <h2 style={{textAlign: 'center'}}>2015年水泥企业信息调研表</h2><br/>
                    <table className="table5">
                        <th>企业名称：</th>
                        <td style={{width: '26%'}}>
                            <Input placeholder="请输入企业名称" value={data[0]} onChange={event => {
                                this.handlechange1(event, 0)
                            }}/>
                        </td>
                        <th>生产线名称：</th>
                        <td style={{width: '14%'}}>
                            <Input placeholder="请输入生产线名称" value={data[1]} onChange={event => {
                                this.handlechange1(event, 1)
                            }}/>

                        </td>
                        <th>生产线设计规模：</th>
                        <td>
                            <Input placeholder="请输入生产设计规模" value={data[2]} onChange={event => {
                                this.handlechange1(event, 2)
                            }}/>
                        </td>
                        <th>年运转天数：</th>
                        <td>
                            <Input placeholder="请输入年运转天数" value={data[3]} onChange={event => {
                                this.handlechange1(event, 3)
                            }}/>
                        </td>
                    </table>
                    <table className="table6">
                        <tr>
                            <th>企业所在地址：</th>
                            <td style={{width: '48%'}}>
                                <Input placeholder="请输入企业所在地址" value={data[4]} onChange={event => {
                                    this.handlechange1(event, 4)
                                }}/>
                            </td>
                            <th>填表联系人：</th>
                            <td>
                                <Input placeholder="请输入填表联系人" value={data[5]} onChange={event => {
                                    this.handlechange1(event, 5)
                                }}/>
                            </td>
                            <th>联系电话：</th>
                            <td>
                                <Input placeholder="请输入联系电话" value={data[6]} onChange={event => {
                                    this.handlechange1(event, 6)
                                }}/>
                            </td>
                        </tr>
                    </table>
                </div>
                <div className="second">
                    <table border="3" className="table1">
                        <tr>
                            <th rowSpan='8' style={{width: '2%'}}>资<br/>源<br/>消<br/>耗</th>
                            <th rowSpan='2' style={{width: '10%'}}>类别</th>
                            <th colSpan='6'>熟料烧成用原材料（含替代原料）</th>
                            <th colSpan='3'>燃料(含替代燃料)</th>
                            <th rowSpan='3' style={{width: '5%'}}>熟料<br/>产量</th>
                        </tr>
                        <tr>
                            <td>原料1</td>
                            <td>原料2</td>
                            <td>原料3</td>
                            <td>原料4</td>
                            <td>原料5</td>
                            <td>原料6</td>
                            <td>燃料1</td>
                            <td>燃料2</td>
                            <td>燃料3</td>
                        </tr>
                        <tr>
                            <th>原材料名称</th>
                            <td><Input value={yuanliao1[0]} onChange={event => {
                                this.handlechange2(event, 0)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao1[1]} onChange={event => {
                                this.handlechange2(event, 1)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao1[2]} onChange={event => {
                                this.handlechange2(event, 2)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao1[3]} onChange={event => {
                                this.handlechange2(event, 3)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao1[4]} onChange={event => {
                                this.handlechange2(event, 4)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao1[5]} onChange={event => {
                                this.handlechange2(event, 5)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao1[6]} onChange={event => {
                                this.handlechange2(event, 6)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao1[7]} onChange={event => {
                                this.handlechange2(event, 7)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao1[8]} onChange={event => {
                                this.handlechange2(event, 8)
                            }} placeholder="请输入原料名称"/></td>
                        </tr>
                        <tr>
                            <th>消耗情况，万吨/年</th>
                            <td><Input value={xiaohao1[0]} onChange={event => {
                                this.handlechange3(event, 0)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao1[1]} onChange={event => {
                                this.handlechange3(event, 1)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao1[2]} onChange={event => {
                                this.handlechange3(event, 2)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao1[3]} onChange={event => {
                                this.handlechange3(event, 3)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao1[4]} onChange={event => {
                                this.handlechange3(event, 4)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao1[5]} onChange={event => {
                                this.handlechange3(event, 5)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao1[6]} onChange={event => {
                                this.handlechange3(event, 6)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao1[7]} onChange={event => {
                                this.handlechange3(event, 7)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao1[8]} onChange={event => {
                                this.handlechange3(event, 8)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao1[9]} onChange={event => {
                                this.handlechange3(event, 9)
                            }} placeholder="请输入"/></td>
                        </tr>
                        <tr>
                            <th rowSpan='2'>类别</th>
                            <th colSpan='9'>水泥制成用原材料（含替代原料）</th>
                            <th rowSpan='3'>水泥<br/>产量</th>
                        </tr>
                        <tr>
                            <td>原料1</td>
                            <td>原料2</td>
                            <td>原料3</td>
                            <td>原料4</td>
                            <td>原料5</td>
                            <td>原料6</td>
                            <td>原料7</td>
                            <td>原料8</td>
                            <td>原料9</td>
                        </tr>
                        <tr>
                            <th>原材料名称</th>
                            <td><Input value={yuanliao2[0]} onChange={event => {
                                this.handlechange4(event, 0)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao2[1]} onChange={event => {
                                this.handlechange4(event, 1)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao2[2]} onChange={event => {
                                this.handlechange4(event, 2)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao2[3]} onChange={event => {
                                this.handlechange4(event, 3)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao2[4]} onChange={event => {
                                this.handlechange4(event, 4)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao2[5]} onChange={event => {
                                this.handlechange4(event, 5)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao2[6]} onChange={event => {
                                this.handlechange4(event, 6)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao2[7]} onChange={event => {
                                this.handlechange4(event, 7)
                            }} placeholder="请输入原料名称"/></td>
                            <td><Input value={yuanliao2[8]} onChange={event => {
                                this.handlechange4(event, 8)
                            }} placeholder="请输入原料名称"/></td>
                        </tr>
                        <tr>
                            <th>消耗情况，万吨/年</th>
                            <td><Input value={xiaohao2[0]} onChange={event => {
                                this.handlechange5(event, 0)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao2[1]} onChange={event => {
                                this.handlechange5(event, 1)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao2[2]} onChange={event => {
                                this.handlechange5(event, 2)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao2[3]} onChange={event => {
                                this.handlechange5(event, 3)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao2[4]} onChange={event => {
                                this.handlechange5(event, 4)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao2[5]} onChange={event => {
                                this.handlechange5(event, 5)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao2[6]} onChange={event => {
                                this.handlechange5(event, 6)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao2[7]} onChange={event => {
                                this.handlechange5(event, 7)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao2[8]} onChange={event => {
                                this.handlechange5(event, 8)
                            }} placeholder="请输入消耗情况"/></td>
                            <td><Input value={xiaohao2[9]} onChange={event => {
                                this.handlechange5(event, 9)
                            }} placeholder="请输入"/></td>
                        </tr>
                    </table>
                    <table border="3" className="table2">
                        <tr>
                            <th rowSpan='3'>能源消耗</th>
                            <th>项目</th>
                            <th>生料粉磨<br/>工段电耗</th>
                            <th>可比熟料<br/>综合煤耗</th>
                            <th>可比熟料<br/>综合电耗</th>
                            <th>可比熟料<br/>综合能耗</th>
                            <th>可比水泥<br/>综合电耗</th>
                            <th>可比水泥<br/>综合能耗</th>
                            <th>单位熟料<br/>余热发电量</th>
                        </tr>
                        <tr>
                            <th>单位</th>
                            <td>kWh/t</td>
                            <td>kgce/t</td>
                            <td>kWh/t</td>
                            <td>kgce/t</td>
                            <td>kWh/t</td>
                            <td>kgce/t</td>
                            <td>kWh/t</td>
                        </tr>
                        <tr>
                            <th>数值</th>
                            <td><Input value={shuzhi[0]} onChange={event => {
                                this.handlechange6(event, 0)
                            }} placeholder="请输入数值"/></td>
                            <td><Input value={shuzhi[1]} onChange={event => {
                                this.handlechange6(event, 1)
                            }} placeholder="请输入数值"/></td>
                            <td><Input value={shuzhi[2]} onChange={event => {
                                this.handlechange6(event, 2)
                            }} placeholder="请输入数值"/></td>
                            <td><Input value={shuzhi[3]} onChange={event => {
                                this.handlechange6(event, 3)
                            }} placeholder="请输入数值"/></td>
                            <td><Input value={shuzhi[4]} onChange={event => {
                                this.handlechange6(event, 4)
                            }} placeholder="请输入数值"/></td>
                            <td><Input value={shuzhi[5]} onChange={event => {
                                this.handlechange6(event, 5)
                            }} placeholder="请输入数值"/></td>
                            <td><Input value={shuzhi[6]} onChange={event => {
                                this.handlechange6(event, 6)
                            }} placeholder="请输入数值"/></td>
                        </tr>
                    </table>
                    <table border="3" className="table3">
                        <tr>
                            <th rowSpan='5'>废气排放</th>
                            <th rowSpan='2'>项目</th>
                            <th colSpan='5'>颗粒物</th>
                            <th>SO2</th>
                            <th>NOX</th>
                            <th>喷氨</th>
                            <th colSpan='3'>脱硝工艺(划勾)</th>
                        </tr>
                        <tr>
                            <th>窑头</th>
                            <th>窑尾</th>
                            <th>水泥磨</th>
                            <th>煤磨</th>
                            <th>包装机*</th>
                            <th>窑尾</th>
                            <th>窑尾</th>
                            <th>kg/t熟料</th>
                            <th style={{width: '3%'}}>1</th>
                            <th>SNCR</th>
                            <th><RadioGroup options={options1} onChange={this.onChange1} value={this.state.value1}/>
                            </th>
                        </tr>
                        <tr>
                            <th>年排放量，吨/年</th>
                            <td><Input value={paifang[0]} onChange={event => {
                                this.handlechange7(event, 0)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[1]} onChange={event => {
                                this.handlechange7(event, 1)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[2]} onChange={event => {
                                this.handlechange7(event, 2)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[3]} onChange={event => {
                                this.handlechange7(event, 3)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[4]} onChange={event => {
                                this.handlechange7(event, 4)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[5]} onChange={event => {
                                this.handlechange7(event, 5)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[6]} onChange={event => {
                                this.handlechange7(event, 6)
                            }} placeholder="请输入排放量"/></td>
                            <th rowSpan='2'><Input value={paifang[7]} onChange={event => {
                                this.handlechange7(event, 7)
                            }} placeholder="请输入排放量"/></th>
                            <th>2</th>
                            <th>分级燃烧</th>
                            <th><RadioGroup options={options2} onChange={this.onChange2} value={this.state.value2}/>
                            </th>
                        </tr>
                        <tr>
                            <th>排放浓度，mg/m3</th>
                            <td><Input value={paifang[8]} onChange={event => {
                                this.handlechange7(event, 8)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[9]} onChange={event => {
                                this.handlechange7(event, 9)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[10]} onChange={event => {
                                this.handlechange7(event, 10)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[11]} onChange={event => {
                                this.handlechange7(event, 11)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[12]} onChange={event => {
                                this.handlechange7(event, 12)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[13]} onChange={event => {
                                this.handlechange7(event, 13)
                            }} placeholder="请输入排放量"/></td>
                            <td><Input value={paifang[14]} onChange={event => {
                                this.handlechange7(event, 14)
                            }} placeholder="请输入排放量"/></td>
                            <th>3</th>
                            <th>1+2</th>
                            <th><RadioGroup options={options3} onChange={this.onChange3} value={this.state.value3}/>
                            </th>
                        </tr>
                        <tr>
                            <th>除尘方式（电/袋)</th>
                            <td><Input value={chucheng[0]} onChange={event => {
                                this.handlechange8(event, 0)
                            }} placeholder="请输入除尘方式"/></td>
                            <td><Input value={chucheng[1]} onChange={event => {
                                this.handlechange8(event, 1)
                            }} placeholder="请输入除尘方式"/></td>
                            <td><Input value={chucheng[2]} onChange={event => {
                                this.handlechange8(event, 2)
                            }} placeholder="请输入除尘方式"/></td>
                            <td><Input value={chucheng[3]} onChange={event => {
                                this.handlechange8(event, 3)
                            }} placeholder="请输入除尘方式"/></td>
                            <td><Input value={chucheng[4]} onChange={event => {
                                this.handlechange8(event, 4)
                            }} placeholder="请输入除尘方式"/></td>
                            <td><Input value={chucheng[5]} onChange={event => {
                                this.handlechange8(event, 5)
                            }} placeholder="请输入除尘方式"/></td>
                            <td><Input value={chucheng[6]} onChange={event => {
                                this.handlechange8(event, 6)
                            }} placeholder="请输入除尘方式"/></td>
                            <td><Input value={chucheng[7]} onChange={event => {
                                this.handlechange8(event, 7)
                            }} placeholder="请输入除尘方式"/></td>
                            <th>4</th>
                            <th>其它</th>
                            <th><RadioGroup options={options4} onChange={this.onChange4} value={this.state.value4}/>
                            </th>
                        </tr>
                    </table>
                    <table border="3" className="table4">
                        <tr>
                            <th rowSpan='3'>主要设备</th>
                            <th rowSpan='2'>设备名称</th>
                            <th colSpan='3'>生料磨</th>
                            <th>窑</th>
                            <th colSpan='3'>水泥磨</th>
                        </tr>
                        <tr>
                            <th>粉磨方式</th>
                            <th>规格型号</th>
                            <th>数量</th>
                            <th>规格</th>
                            <th>粉磨方式</th>
                            <th>规格型号</th>
                            <th>数量</th>
                        </tr>
                        <tr>
                            <th>设备情况</th>
                            <td><Input value={qingkuang[0]} onChange={event => {
                                this.handlechange9(event, 0)
                            }} placeholder="请输入设备情况"/></td>
                            <td><Input value={qingkuang[1]} onChange={event => {
                                this.handlechange9(event, 1)
                            }} placeholder="请输入设备情况"/></td>
                            <td><Input value={qingkuang[2]} onChange={event => {
                                this.handlechange9(event, 2)
                            }} placeholder="请输入设备情况"/></td>
                            <td><Input value={qingkuang[3]} onChange={event => {
                                this.handlechange9(event, 3)
                            }} placeholder="请输入设备情况"/></td>
                            <td><Input value={qingkuang[4]} onChange={event => {
                                this.handlechange9(event, 4)
                            }} placeholder="请输入设备情况"/></td>
                            <td><Input value={qingkuang[5]} onChange={event => {
                                this.handlechange9(event, 5)
                            }} placeholder="请输入设备情况"/></td>
                            <td><Input value={qingkuang[6]} onChange={event => {
                                this.handlechange9(event, 6)
                            }} placeholder="请输入设备情况"/></td>
                        </tr>
                    </table>
                </div>
                <p>*备注：若无该数据计算值，可空缺。</p>
                <div id="dongzuo" style={{float: 'right', marginTop: -20}}>
                    <Button  style={{color: 'white', backgroundColor: '#507dff', marginRight: 5}} onClick = {this.handleBack} >退出</Button>
                    <Button onClick={this.handleSubmit} id="save" style={{color: 'white', backgroundColor: '#507dff'}}>提交</Button>
                </div>
            </form>
        )
    }
}
